import service from "@/util/request.js"
import request from "@/util/request.js"

const getAll = ()=>{
    return request({
        url:"User/getAll",
    })
}

const query=(data)=>{
	return service({
		url:'/Userinfo',
		params:data,
	})
}

const get=(data)=>{
	return service({
		url:'/Userinfo/get',
		params:data,
	})
}

const getUserInfo = ()=>{
	return service({
		url:'/userInfo/getUserInfo'
	})
}

const Update=(data)=>{
	return service({
		url:'/Userinfo/update',
		method:"post",
		data:data,
	})
}

const add=(data)=>{
	return service({
		url:'/Userinfo/Add',
		method:"post",
		data:data,
	})
}

const del=(id)=>{
	return service({
		url:'/Userinfo/delete',
		method:"post",
		params:{id},
	})
}

const Impower=(userid,roleids)=>{
	return service({
		url:'/Userinfo/Impower',
		method:"post",
		data:{userid,roleids},
	})
}

const YseImpower=(data)=>{
	return service({
		url:'/Userinfo/YesImpower',
		params:data,
	})
}
export default {
    getAll,
	query,
	get,
	add,
	del,
	Update,
	Impower,
	YseImpower,
	getUserInfo
}